package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the "FLOOR" database table.
 * 
 */
@Entity
@Table(name="\"FLOOR\"")
@NamedQuery(name="Floor.findAll", query="SELECT f FROM Floor f")
public class Floor implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="FLOOR_ID")
	private String floorId;

	private String floorname;

	//bi-directional many-to-one association to Build
	@ManyToOne
	@JoinColumn(name="BUILD_ID")
	private Build build;

	//bi-directional many-to-one association to OfficeFunction
	@OneToMany(mappedBy="floor")
	private List<OfficeFunction> officeFunctions;

	//bi-directional many-to-one association to SickroomTable
	@OneToMany(mappedBy="floor")
	private List<SickroomTable> sickroomTables;

	public Floor() {
	}

	public String getFloorId() {
		return this.floorId;
	}

	public void setFloorId(String floorId) {
		this.floorId = floorId;
	}

	public String getFloorname() {
		return this.floorname;
	}

	public void setFloorname(String floorname) {
		this.floorname = floorname;
	}

	public Build getBuild() {
		return this.build;
	}

	public void setBuild(Build build) {
		this.build = build;
	}

	public List<OfficeFunction> getOfficeFunctions() {
		return this.officeFunctions;
	}

	public void setOfficeFunctions(List<OfficeFunction> officeFunctions) {
		this.officeFunctions = officeFunctions;
	}

	public OfficeFunction addOfficeFunction(OfficeFunction officeFunction) {
		getOfficeFunctions().add(officeFunction);
		officeFunction.setFloor(this);

		return officeFunction;
	}

	public OfficeFunction removeOfficeFunction(OfficeFunction officeFunction) {
		getOfficeFunctions().remove(officeFunction);
		officeFunction.setFloor(null);

		return officeFunction;
	}

	public List<SickroomTable> getSickroomTables() {
		return this.sickroomTables;
	}

	public void setSickroomTables(List<SickroomTable> sickroomTables) {
		this.sickroomTables = sickroomTables;
	}

	public SickroomTable addSickroomTable(SickroomTable sickroomTable) {
		getSickroomTables().add(sickroomTable);
		sickroomTable.setFloor(this);

		return sickroomTable;
	}

	public SickroomTable removeSickroomTable(SickroomTable sickroomTable) {
		getSickroomTables().remove(sickroomTable);
		sickroomTable.setFloor(null);

		return sickroomTable;
	}

}